'''
Created on 2011-9-19

@author: Johnny

Handle file uploaded from web page
'''

def handle_uploaded_file(file):
    filename = str(file)
    fd = open('%s/%s' % ('D:/OSIM_automation/osim_site/src/Cases', filename), 'wb')
    
    for chunk in file.chunks():
        fd.write(chunk)
    
    fd.close()
    return filename